# encoding:utf-8
from public.common.basepage import Page
from public.common.pyselenium import PySelenium


class LoginPage(Page):
    def open_login_home(self, url):
        """ 打开登录页面"""
        self.dr.max_window()
        # self.dr.open("http://www.testingedu.com.cn:8000/index.php/Home/Index/index.html")
        self.dr.open(url)

    def input_username(self, css, value):
        self.dr.send_keys(css, value)

    def input_pwd(self, css, value):
        self.dr.send_keys(css, value)

    def input_verifycode(self, css, value):
        self.dr.send_keys(css, value)

    def click_login(self, css):
        self.dr.click(css)

    def assert_txt(self, expect, practical):
        self.dr.assert_equals(expect, practical)
